﻿using System;
using System.ComponentModel;
using System.Linq;
using ProjectEuler.Linq;

namespace ProjectEuler.Problems
{
    [EulerProblem(6, 25164150)]
    [Description("What is the difference between the sum of the squares and the square of the sums?")]
    internal sealed class Problem006 : EulerProblem
    {
        public override Object Solve()
        {
            var range = (1).To(100);

            return
                range.Sum().Square() -
                range.Sum(n => n.Square());
        }
    }
}
